package com.dl.blog.mapper;

import com.dl.blog.entity.VisitPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;

/**
 * @author DL
 * @create 2025-07-07 下午10:52
 */
@Mapper
public interface VisitPageMapper {
    // 根据URL和站点ID查询页面
    VisitPage selectByUrlAndSiteId(@Param("siteId") String siteId, @Param("pageUrl") String pageUrl);

    // 插入新页面，返回自增主键
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    int insert(VisitPage visitPage);
}
